<!--
 * @Author: your name
 * @Date: 2022-02-17 16:35:07
 * @LastEditTime: 2022-02-17 16:44:05
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \0217\浮动.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>浮动</title>
    <style>
        .wrap{
            width: 600px;
            background: palevioletred;
            margin: 0 auto;
        }
        .wrap div{
            width: 200px;
            height: 200px;
        }
        .one{
            background: red;
            float: left;
        }
        .two{
            background: palegoldenrod;
            float: right;
        }
        .three{
            width: 600px;
            height: 200px;
            background: yellowgreen;
            margin: 0 auto;
            /* clear: both; */
        }
        /* .clearfix:before{
            content: "111";
            display: block;
            clear: both;
        } */
        .clearfix:after{
            content: "";
            display: block;
            clear: both;
        }
    </style>
</head>
<body>
    <div class="wrap clearfix">
        <div class="one">

        </div>
        <div class="two">
    
        </div>
    </div>
    <div class="three">

    </div>
</body>
</html>